<template>
<h1>单选组件</h1>
  <el-radio-group  v-model="edu">
    <el-radio value="初中" label="学历初中"></el-radio>
    <el-radio value="高中" label="学历高中"></el-radio>
    <el-radio value="本科" label="学历本科"></el-radio>
    <el-radio value="硕士" label="学历硕士"></el-radio>

  </el-radio-group>
  <h4>你选择的学历是：{{edu}}</h4>
  <hr>
  <el-radio-group v-model="pri">
    <el-radio-button v-for="p in arr" :label="p.title" :value="p.price"></el-radio-button>

  </el-radio-group>
  <h4>你选择的商品的价格是：{{pri}} 元 </h4>
</template>
<script setup>
import {ref} from "vue";

const edu=ref('')

const arr=ref([
  {title:'五粮液',price:500},
  {title:'茅台',price:1500},
  {title:'梦之蓝',price:380},
  {title:'江小白',price:200},
  {title:'汾酒',price:3000},
]);
const pri=ref('380')

</script>


<style scoped>

</style>